package java5;

import java.util.Arrays;
import java.util.Scanner;

public class Main1 {
		public static void main(String[] args) {
			@SuppressWarnings("resource")
			Scanner in=new Scanner(System.in);
			Rectangle[] r=new Rectangle[2];
			Circle[] c=new Circle[2];
			r[0]=new Rectangle(in.nextInt(),in.nextInt());
			r[1]=new Rectangle(in.nextInt(),in.nextInt());
	        c[0]=new Circle(in.nextInt());
	        c[1]=new Circle(in.nextInt());
	        System.out.println(r[0].getPerimeter()+r[1].getPerimeter()+c[0].getPerimeter()+c[1].getPerimeter());
	        System.out.println(r[0].getArea()+r[1].getArea()+c[0].getArea()+c[1].getArea());
	        System.out.println(Arrays.toString(r));
	        System.out.println(Arrays.toString(c));
		}

}
